home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 44 / Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso / -in_the_mag- / basics / amos / intuiextend20b.lha / distribution / exemples / IffCommand2Amos.asc < prev    next >
Text File  |  1980-03-06  |  2KB  |  67 lines

  1. '**************************************
  2. '                                     *
  3. '     IntuiExtend.Lib 2.0/@1995-98    *
  4. '                                     *
  5. '          by CIERP Philippe.         *
  6. '                                     *
  7. '          from AMIGAzette 83         *
  8. '                                     *
  9. '**************************************
  10. '
  11. ' Command  
  12. '  -Iff Open Read
  13. '  -Iff Get Error
  14. '  -Iff Get Vmode
  15. '  -Iff Get Width
  16. '  -Iff Get Height   
  17. '  -Iff Get Xpos   
  18. '  -Iff Get Ypos   
  19. '  -Iff Get Depth    
  20. '  -Wb Depth To Colour 
  21. '  -Amos Rastport
  22. '  -Iff Decode Picture 
  23. '  -Iff Close
  24. '
  25. ' Ouverture de l'image en lecture  
  26. A$=Fsel$("")+Chr$(0)
  27. _IFF=Iff Open Read(A$)
  28. '
  29. If _IFF<=0
  30.    ERR0R=Iff Get Error
  31.    Print ERR0R
  32.    Iff Close _IFF
  33.    End 
  34. End If 
  35. '
  36. ' Prendre le mode video (ViewMode > EHB, HAM6, HAM8, Lace, Hires etc...) 
  37. VMODE=Iff Get Vmode(_IFF)
  38. '
  39. ' Prise des informations dans le BMHD  
  40. WIDTH=Iff Get Width(_IFF)
  41. HEIGHT=Iff Get Height(_IFF)
  42. XPOS=Iff Get Xpos(_IFF)
  43. YPOS=Iff Get Ypos(_IFF)
  44. DEPTH=Iff Get Depth(_IFF)
  45. _COL_NB=Wb Depth To Colour(DEPTH)
  46.  
  47. ' Ouvre un ecran Amos... 
  48. Screen Open 0,WIDTH,HEIGHT,_COL_NB,VMODE
  49. Curs Off : Flash Off : Cls 0
  50. '
  51. ' Reserver le buffer pour la palette de l'image
  52. Reserve As Work 998,256*2 : CTABLE=Start(998)
  53. '
  54. ' Convertion du CMAP en palette. 
  55. _COLOR_MAX=Iff Get Ctable(_IFF,CTABLE)
  56. '
  57. ' Affecter la palette a l'écran Amos 
  58. For T=0 To _COL_NB-1
  59.    Colour T,Deek(CTABLE+(T*2))
  60. Next T
  61. '
  62. ' Afficher l'image 
  63. RES=Iff Decode Picture(_IFF,Amos Rastport)
  64. Iff Close _IFF
  65. '
  66. While Mouse Key<>2 : Wend 
  67.